App.controller('employeeController', ['$rootScope', '$scope', '$state', 'Page', function($rootScope, $scope, $state, Page) {

    Page.ajaxPost("department/tree.do", null, function (response) {
        $scope.depts = response.data;
    });
    // 部门树点击事件
    $scope.selectDept = function(dept) {
        $scope.dept = dept;
        $scope.empGrid.query({deptId: dept.deptId});
    }

    $scope.empGrid = {
    };

}]);